package com.atguigu.userprofile.dao;

import com.atguigu.userprofile.beans.TaskInfo;
import com.atguigu.userprofile.constant.ConstCode;
import com.atguigu.userprofile.utils.MySQLUtil;

import java.sql.DriverManager;

/**
 * @Classname TaskInfoDao
 * @Date 2022/10/2 16:41
 * @Created by arun
 */
public class TaskInfoDao {

    public static TaskInfo selectTaskInfoById( String id ){
        String sql = " select id , task_name , task_status , task_comment , task_time , task_type ," +
                " exec_type , main_class , file_id , task_args , task_sql , task_exec_level , create_time " +
                " from task_info " +
                " where id = " + id  ;
        TaskInfo taskInfo = MySQLUtil.selectOne(sql, TaskInfo.class, true);
        return taskInfo ;
    }


    public static void main(String[] args) {
        TaskInfo taskInfo = selectTaskInfoById("1");
        System.out.println(taskInfo);
    }
}
